package cn.jsj.finance.bank;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 查看银行帐总资金
 * @author LI
 *
 */
 public class LookbankLeftMoney extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	 public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// 调试信息
		 cn.jsj.utils.SysLogger.PrintInfo("查看银行帐总资金") ;

		 //获取总资金
		 cn.jsj.dao.TblBankAccountDAO tbad=new cn.jsj.dao.TblBankAccountDAO();
		 int totalBankMoney=tbad.getTotalBankMoney();
		 //调试
		 cn.jsj.utils.SysLogger.PrintInfo("总资金----------->"+totalBankMoney);

		 //构造JSON型数据
		 String jsonData="{result:[{bankleftmoney:'"+totalBankMoney+"'}]}";

		 //输出流
		 java.io.PrintWriter out=response.getWriter();
		 out.println(jsonData);
		 out.flush();
		 out.close();

	}
}